package com.qijia.travel.domain.example;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
import java.util.Map;

public class AgencyMissionExample extends BaseExample{

	protected String orderByClause;
	protected List<Criteria> oredCriteria;

	public AgencyMissionExample() {
		oredCriteria = new ArrayList<Criteria>();
	}

	protected AgencyMissionExample(AgencyMissionExample example) {
		this.orderByClause = example.orderByClause;
		this.oredCriteria = example.oredCriteria;
	}

	public void setOrderByClause(String orderByClause) {
		this.orderByClause = orderByClause;
	}

	public String getOrderByClause() {
		return orderByClause;
	}

	public List<Criteria> getOredCriteria() {
		return oredCriteria;
	}

	public void or(Criteria criteria) {
		oredCriteria.add(criteria);
	}

	public Criteria createCriteria() {
		Criteria criteria = createCriteriaInternal();
		if (oredCriteria.size() == 0) {
			oredCriteria.add(criteria);
		}
		return criteria;
	}

	protected Criteria createCriteriaInternal() {
		Criteria criteria = new Criteria();
		return criteria;
	}

	public void clear() {
		oredCriteria.clear();
	}

	public static class Criteria {
		protected List<String> criteriaWithoutValue;
		protected List<Map<String, Object>> criteriaWithSingleValue;
		protected List<Map<String, Object>> criteriaWithListValue;
		protected List<Map<String, Object>> criteriaWithBetweenValue;

		protected Criteria() {
			super();
			criteriaWithoutValue = new ArrayList<String>();
			criteriaWithSingleValue = new ArrayList<Map<String, Object>>();
			criteriaWithListValue = new ArrayList<Map<String, Object>>();
			criteriaWithBetweenValue = new ArrayList<Map<String, Object>>();
		}

		public boolean isValid() {
			return criteriaWithoutValue.size() > 0
					|| criteriaWithSingleValue.size() > 0
					|| criteriaWithListValue.size() > 0
					|| criteriaWithBetweenValue.size() > 0;
		}

		public List<String> getCriteriaWithoutValue() {
			return criteriaWithoutValue;
		}

		public List<Map<String, Object>> getCriteriaWithSingleValue() {
			return criteriaWithSingleValue;
		}

		public List<Map<String, Object>> getCriteriaWithListValue() {
			return criteriaWithListValue;
		}

		public List<Map<String, Object>> getCriteriaWithBetweenValue() {
			return criteriaWithBetweenValue;
		}

		protected void addCriterion(String condition) {
			if (condition == null) {
				throw new RuntimeException("Value for condition cannot be null");
			}
			criteriaWithoutValue.add(condition);
		}

		protected void addCriterion(String condition, Object value,
				String property) {
			if (value == null) {
				throw new RuntimeException("Value for " + property
						+ " cannot be null");
			}
			Map<String, Object> map = new HashMap<String, Object>();
			map.put("condition", condition);
			map.put("value", value);
			criteriaWithSingleValue.add(map);
		}

		protected void addCriterion(String condition,
				List<? extends Object> values, String property) {
			if (values == null || values.size() == 0) {
				throw new RuntimeException("Value list for " + property
						+ " cannot be null or empty");
			}
			Map<String, Object> map = new HashMap<String, Object>();
			map.put("condition", condition);
			map.put("values", values);
			criteriaWithListValue.add(map);
		}

		protected void addCriterion(String condition, Object value1,
				Object value2, String property) {
			if (value1 == null || value2 == null) {
				throw new RuntimeException("Between values for " + property
						+ " cannot be null");
			}
			List<Object> list = new ArrayList<Object>();
			list.add(value1);
			list.add(value2);
			Map<String, Object> map = new HashMap<String, Object>();
			map.put("condition", condition);
			map.put("values", list);
			criteriaWithBetweenValue.add(map);
		}

		public Criteria andAgencyMissionIdIsNull() {
			addCriterion("agency_mission_id is null");
			return this;
		}

		public Criteria andAgencyMissionIdIsNotNull() {
			addCriterion("agency_mission_id is not null");
			return this;
		}

		public Criteria andAgencyMissionIdEqualTo(Integer value) {
			addCriterion("agency_mission_id =", value, "agencyMissionId");
			return this;
		}

		public Criteria andAgencyMissionIdNotEqualTo(Integer value) {
			addCriterion("agency_mission_id <>", value, "agencyMissionId");
			return this;
		}

		public Criteria andAgencyMissionIdGreaterThan(Integer value) {
			addCriterion("agency_mission_id >", value, "agencyMissionId");
			return this;
		}

		public Criteria andAgencyMissionIdGreaterThanOrEqualTo(Integer value) {
			addCriterion("agency_mission_id >=", value, "agencyMissionId");
			return this;
		}

		public Criteria andAgencyMissionIdLessThan(Integer value) {
			addCriterion("agency_mission_id <", value, "agencyMissionId");
			return this;
		}

		public Criteria andAgencyMissionIdLessThanOrEqualTo(Integer value) {
			addCriterion("agency_mission_id <=", value, "agencyMissionId");
			return this;
		}

		public Criteria andAgencyMissionIdIn(List<Integer> values) {
			addCriterion("agency_mission_id in", values, "agencyMissionId");
			return this;
		}

		public Criteria andAgencyMissionIdNotIn(List<Integer> values) {
			addCriterion("agency_mission_id not in", values, "agencyMissionId");
			return this;
		}

		public Criteria andAgencyMissionIdBetween(Integer value1, Integer value2) {
			addCriterion("agency_mission_id between", value1, value2,
					"agencyMissionId");
			return this;
		}

		public Criteria andAgencyMissionIdNotBetween(Integer value1,
				Integer value2) {
			addCriterion("agency_mission_id not between", value1, value2,
					"agencyMissionId");
			return this;
		}

		public Criteria andAgencyMissionSnIsNull() {
			addCriterion("agency_mission_sn is null");
			return this;
		}

		public Criteria andAgencyMissionSnIsNotNull() {
			addCriterion("agency_mission_sn is not null");
			return this;
		}

		public Criteria andAgencyMissionSnEqualTo(String value) {
			addCriterion("agency_mission_sn =", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnNotEqualTo(String value) {
			addCriterion("agency_mission_sn <>", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnGreaterThan(String value) {
			addCriterion("agency_mission_sn >", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnGreaterThanOrEqualTo(String value) {
			addCriterion("agency_mission_sn >=", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnLessThan(String value) {
			addCriterion("agency_mission_sn <", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnLessThanOrEqualTo(String value) {
			addCriterion("agency_mission_sn <=", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnLike(String value) {
			addCriterion("agency_mission_sn like", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnNotLike(String value) {
			addCriterion("agency_mission_sn not like", value, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnIn(List<String> values) {
			addCriterion("agency_mission_sn in", values, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnNotIn(List<String> values) {
			addCriterion("agency_mission_sn not in", values, "agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnBetween(String value1, String value2) {
			addCriterion("agency_mission_sn between", value1, value2,
					"agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionSnNotBetween(String value1,
				String value2) {
			addCriterion("agency_mission_sn not between", value1, value2,
					"agencyMissionSn");
			return this;
		}

		public Criteria andAgencyMissionNameIsNull() {
			addCriterion("agency_mission_name is null");
			return this;
		}

		public Criteria andAgencyMissionNameIsNotNull() {
			addCriterion("agency_mission_name is not null");
			return this;
		}

		public Criteria andAgencyMissionNameEqualTo(String value) {
			addCriterion("agency_mission_name =", value, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameNotEqualTo(String value) {
			addCriterion("agency_mission_name <>", value, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameGreaterThan(String value) {
			addCriterion("agency_mission_name >", value, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameGreaterThanOrEqualTo(String value) {
			addCriterion("agency_mission_name >=", value, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameLessThan(String value) {
			addCriterion("agency_mission_name <", value, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameLessThanOrEqualTo(String value) {
			addCriterion("agency_mission_name <=", value, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameLike(String value) {
			addCriterion("agency_mission_name like", value, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameNotLike(String value) {
			addCriterion("agency_mission_name not like", value,
					"agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameIn(List<String> values) {
			addCriterion("agency_mission_name in", values, "agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameNotIn(List<String> values) {
			addCriterion("agency_mission_name not in", values,
					"agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameBetween(String value1, String value2) {
			addCriterion("agency_mission_name between", value1, value2,
					"agencyMissionName");
			return this;
		}

		public Criteria andAgencyMissionNameNotBetween(String value1,
				String value2) {
			addCriterion("agency_mission_name not between", value1, value2,
					"agencyMissionName");
			return this;
		}
	}
}